package com.haierp.service;

import java.util.List;
import java.util.Map;
import java.util.Set;

import org.apache.ibatis.annotations.Param;

import com.baomidou.framework.service.ISuperService;
import com.haierp.dto.MultiDeliveryFormDTO;
import com.haierp.exception.InventoryException;
import com.haierp.model.ErpOrder;
import com.haierp.model.LogisticCompany;
import com.haierp.model.LogisticType;
import com.haierp.model.ShippingOrder;
import com.haierp.util.JsonPageResult;
import com.haierp.vo.ShippingOrderQueryVO;

public interface IShippingOrderService extends ISuperService<ShippingOrder> {
	
	JsonPageResult<List<ShippingOrder>> queryShippingOrders(ShippingOrderQueryVO shippingOrderQueryVO);
	
	/**
	 * 
	 * @param shippingOrder
	 * @return 主订单ID列表
	 * @throws InventoryException
	 */
	Set<Long> multiDelivery(ShippingOrder shippingOrder,Long companyId) throws InventoryException;
	
	MultiDeliveryFormDTO queryByErpOrderId(String erpOrderId);
	
	void update(ShippingOrder shippingOrder);

	List<LogisticCompany> queryLogisticCompany();

	List<ErpOrder> queryShippingOrderDetail(String erpOrderId);

	List<ErpOrder> queryByShippingOrderTime(ShippingOrderQueryVO shippingOrderQueryVO);

	Map<String, Set<Long>> batchDelivery(ShippingOrder shippingOrder) throws InventoryException;

	void updateOuterstatus(Set<Long> mainIds);
	
	void updateStatusByShippingNo(String  shippingNo);
	
	List<ShippingOrder> queryAllInHaihu();
	
	List<ShippingOrder> queryAllFourPx();
	
	List<ShippingOrder> queryAllFad();

	List<ShippingOrder> queryByShippingOrderPackageTime(ShippingOrderQueryVO shippingOrderQueryVO);

	List<ShippingOrder> queryAllFourPxTwo();
	
	List<LogisticType> queryLogisticType();
	
	//void shippingAuto() throws InventoryException;
}
